var Radio = new require("./radio.js");
var radio = new Radio("music radio","FM 94.57");

radio.on("play",() =>{
    console.log(this.name+this.frequency+" opened");
    setTimeout(() =>{
        console.log("lalalalalala…………")
    },2000)//打开电台后延时两秒触发输出
})
radio.on("stop",() =>{
    console.log(this.name+this.frequency+" closed");
})

setTimeout(() => {
    radio.emit("play");
}, 500);//0.5s触发执行打开电台
setTimeout(() => {
    radio.emit("stop");
}, 5000);//触发执行关闭电台